<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<html>
<head>
<style>
#left {float:padding:5px 5px 5px 5px;width:70%;}
   #right {float:right;width:28%;}
</style>
</head>
<body marginheight="0">
<div id="left">
<p>
<h1>${feedItem.title}&nbsp;&nbsp;
<!--要判断用户是否收藏了这个日志	  -->		
<c:set var="isSaved" value="false" />
<c:forEach items="${feedItem.article.savedFansSet}" var="f">
<c:if test="${f.fansId==loginFans.fansId}">
  <c:set var="isSaved" value="true" />
</c:if>
</c:forEach>			
<c:if test="${isSaved==false}">
<a href="saveFeedItem.html?id=${feedItem.id}">我要收藏</a>
</c:if>
<c:if test="${isSaved==true}">
您已经收藏
</c:if>
<c:if test="${not empty feedItem.article}">
&nbsp;已有${feedItem.article.savedNum}人收藏
</c:if>
</h1>
<br>
<div class=indent>来自:${feedItem.source}&nbsp;&nbsp;<br>
			作者:${feedItem.author}&nbsp;&nbsp;发表于:${feedItem.publishDate}<br>
<p>${feedItem.content}</p>
<br>
该日志的原文地址为：<a target="_blank" href="${feedItem.url}">${feedItem.url}</a><br>
</div>
</div>

<div id="right">
<h2>该作者近期日志</h2>
<div class=indent><c:forEach items="${relFeedItems}" var="feedItem">
	<a href="viewFeedItem/${feedItem.id}">${feedItem.title}</a>
<!--要判断用户是否收藏了这个日志	  -->		
<c:set var="isSaved" value="false" />
<c:forEach items="${feedItem.article.savedFansSet}" var="f">
<c:if test="${f.fansId==loginFans.fansId}">
  <c:set var="isSaved" value="true" />
</c:if>
</c:forEach>			
<c:if test="${isSaved==false}">
(<a href="saveFeedItem.html?id=${feedItem.id}">我要收藏</a>)
</c:if>

<br>
</c:forEach></div>
</div>
</body>
</html>
